#include "pthread_impl.h"

int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *a, int prioceiling)
{
    if ((a == NULL) || (prioceiling < PTHREAD_PRIORITY_HIGHEST) || (prioceiling > PTHREAD_PRIORITY_LOWEST)) {
        return EINVAL;
    }

    a->__attr = (a->__attr & ~0x0000ff00) | (prioceiling << 8);
    return 0;
}
